package com.lehoon.tomato.model;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author wang
 * @since 2020-09-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class UserFundRecord extends Model<UserFundRecord> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private Integer userId;

    private String title;

    private BigDecimal remaining;

    private BigDecimal changeMoney;

    /**
     * 1）增加，0）减少
     */
    private Integer changeType;

    /**
     * 创建时间
     */
    private Integer createTime;

    /**
     * 关联id，如果是店长推广收益：关联id是订单id
     */
    private String rationId;

    /**
     * 1）销售收入,2）申请提现,3）推广奖励,4）库存不足退回金额,5）转移商品支付，6）资产支付订单，7）转移商品接收
     */
    private Integer type;

    /**
     * 对方uid
     */
    private Integer fromUserId;

    /**
     * 状态：1）正常，2）未兑现
     */
    private Boolean state;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
